/* 404 NotFound */
import React, {Component} from 'react';
import { Button } from 'antd';
import PropTypes from 'prop-types';
import Img from '../../../assets/error.gif';
import './index.less'
export default class NotFound extends Component {
  static propTypes = {
    history: PropTypes.any,
  };
  constructor(props) {
    super(props);
    this.state = {
      show: false
    };
    console.log('-----> 404被加载了')
  }

  componentDidMount() {
  }

  handleGoBackHome = () => {
    this.props.history.replace('/');
  };

  render() {
    return (
        <div className="error-page">
          <div>
            <div className="title">404</div>
            <div className="info">Oh dear</div>
            <div className="info">这里什么也没有</div>
            <Button className="back-btn" type="primary" ghost onClick={this.handleGoBackHome.bind(this)}>返回首页</Button>
          </div>
          <img src={Img + `?${new Date().getTime()}`} />
        </div>
    );
  }
}